﻿using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
namespace INTEX.DataBase.Tools
{
    public partial class INTEXDBC
    {
        public void MapWBBEW(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SaveWBBEW(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryWBBEW(dwData);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }
            MapWBBEW(ref dwLocal, dwData);

            if (!flgExist)
            {
                InsertWBBEW(dwLocal, ITXDBVERSION);
            }
            UpdateWBBEW(dwLocal);
        }
        public void InsertWBBEW(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "INSERT INTO WBBEW(WBEWMANDANT, WBEWJJJJ, WBEWBELEG, WBEWLFDNR, WBEWKUNDNR, WBEWWERK, WBEWABT, WBEWWAKZ, WBEWART, WBEWVAR, WBEWDESS, WBEWCOLORIT, WBEWFARBE, WBEWBESCHICH, WBEWZUSTAND, WBEWZENSUR, WBEWZENSURKZ, WBEWTAX, WBEWAUFMSL, WBEWPACKTYP, WBEWLO, WBEWLB, WBEWLP, WBEWAUFBKZ, WBEWRWKRS, WBEWRWLFD, WBEWPOS, WBEWSTKNR, WBEWTSTKNR, WBEWGEBNR, WBEWGEBPOS, WBEWDPART, WBEWLAGE, WBEWBAHN, WBEWFSCHL, WBEWPACKNR, WBEWAUFTYP, WBEWAUFKRS, WBEWAUFLFD, WBEWAUFPOS, WBEWAFOLGE, WBEWTP, WBEWAPOS, WBEWWDUPOS, WBEWMNRKRS, WBEWMLFDNR, WBEWMPOS, WBEWSCHICHT, WBEWKSTKRS, WBEWKST, WBEWKOSTART, WBEWBS, WBEWWERT, WBEWWERTDAT, WBEWWEKORR, WBEWMTR, WBEWGEW, WBEWBRT, WBEWBUCHDAT, WBEWBUCHUHR, WBEWBUCHBEN, WBEWFC, WBEWKONDAT, WBEWMATABR, WBEWSTORKZ, WBEWINVBLG, WBEWRENRG, WBEWSTGRD, WBEWACTION, WBEWSAPKZ, WBEWFILLER)"
                                            + "VALUES (:WBEWMANDANT, 0, :WBEWBELEG, :WBEWLFDNR, '00000000', '   ', '   ', ' ', '                    ', '  ', '          ', '          ', '          ', '          ', '    ', '1', 'A', '   ', '  ', '    ', '  ', '  ', '        ', 'J', '  ', '      ', '    ', '            ', '            ', '        ', '000', '           ', 0, 0, '   ', '0000', ' ', '  ', '      ', '   ', '000', '0000', '0000', '00', '  ', '0000', '00', '0', '  ', '0000', '      ', '  ', 0, 0, '  ', 0, 0, 0, 0, 0, '        ', '        ', 0, 'J', ' ', 0, '           ', '  ', '  ', ' ', :WBEWFILLER)";
            or1.Parameters.Add("WBEWMANDANT", OracleType.NVarChar).Value = dwData["WBEWMANDANT"].ToString();
            or1.Parameters.Add("WBEWBELEG", OracleType.NVarChar).Value = dwData["WBEWBELEG"].ToString();
            or1.Parameters.Add("WBEWLFDNR", OracleType.NVarChar).Value = dwData["WBEWLFDNR"].ToString();
            or1.Parameters.Add("WBEWFILLER", OracleType.NVarChar).Value = dwData["WBEWFILLER"].ToString();
            Connect2Proxy(or1);
        }
        public void DeleteWBBEW(string sdkey, string key)
        {

            OracleCommand or1 = OracleDB.CreateCommand();

            string SDKEY = "00" + Left(key + "                       ", 21) + "V";
            or1.CommandText = "SELECT * "
            + " FROM SDDAT WHERE SDSA=:SDSA AND SDKEY =:SDKEY";
            or1.Parameters.Add("SDSA", OracleType.NVarChar).Value = sdkey;
            or1.Parameters.Add("SDKEY", OracleType.NVarChar).Value = SDKEY;
            Connect2Proxy(or1);
        }
        public DataSet QueryWBBEW(DataRow dwData, int option)
        {
            DataSet Return;
            DataSet Result = new DataSet();
            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM WBBEW WHERE  ROWNUM<2 ";
                    break;
                case 1:
                    or1.CommandText = "SELECT MAX(WBEWBELEG) AS WBEWBELEG FROM WBBEW ";
                    break;
                case 2:
                    or1.CommandText = "SELECT WBEWSTKNR,Sum(WBEWMTR) AS TBCM from wbbew  "
                    + " where  WBEWMANDANT=:WBEWMANDANT AND WBEWSTKNR = :WBEWSTKNR and WBEWBS=64 group by WBEWSTKNR ";
                    or1.Parameters.Add("WBEWMANDANT", OracleType.NVarChar).Value = dwData["WBBMANDANT"].ToString();
                    or1.Parameters.Add("WBEWSTKNR", OracleType.NVarChar).Value = dwData["WBBSTKNR"].ToString();
                    break;
                case 3:
                    or1.CommandText = "SELECT*FROM WBBEW WHERE (WBEWBS='13'OR WBEWBS='48' OR WBEWBS='36')"
                    + " AND WBEWMANDANT=:WBEWMANDANT AND WBEWAUFKRS=:WBEWAUFKRS  AND WBEWAUFLFD=:WBEWAUFLFD ";
                    or1.Parameters.Add("WBEWMANDANT", OracleType.NVarChar).Value = dwData["WBEWMANDANT"].ToString();
                    or1.Parameters.Add("WBEWAUFKRS", OracleType.NVarChar).Value = dwData["WBEWAUFKRS"].ToString();
                    or1.Parameters.Add("WBEWAUFLFD", OracleType.NVarChar).Value = dwData["WBEWAUFLFD"].ToString();
                    break;
                case 4:
                    or1.CommandText = "SELECT COUNT(*) FROM WBBEW WHERE WBEWMANDANT=:WBEWMANDANT AND WBEWAUFKRS=:WBEWAUFKRS  AND WBEWAUFLFD=:WBEWAUFLFD "
                        + " AND WBEWAUFPOS=:WBEWAUFPOS AND WBEWART=:WBEWART AND WBEWFARBE=:WBEWFARBE";
                    or1.Parameters.Add("WBEWMANDANT", OracleType.NVarChar).Value = dwData["WBEWMANDANT"].ToString();
                    or1.Parameters.Add("WBEWAUFKRS", OracleType.NVarChar).Value = dwData["WBEWAUFKRS"].ToString();
                    or1.Parameters.Add("WBEWAUFLFD", OracleType.NVarChar).Value = dwData["WBEWAUFLFD"].ToString();
                    or1.Parameters.Add("WBEWAUFPOS", OracleType.NVarChar).Value = dwData["WBEWAUFPOS"].ToString();
                    or1.Parameters.Add("WBEWART", OracleType.NVarChar).Value = dwData["WBEWART"].ToString();
                    or1.Parameters.Add("WBEWFARBE", OracleType.NVarChar).Value = dwData["WBEWFARBE"].ToString();
                    break;
                case 5:
                    or1.CommandText = "  SELECT WBLIEFSCHNR,WBKDPART,WBBRT,WBGRQM,WBGRLFD,WBABS,X.* FROM"
                        + " (SELECT WBEWMANDANT, MAX(WBEWRWLFD) AS WBEWRWLFD,SUM(WBEWMTR*0.001) AS WBEWMTR,SUM(WBEWGEW*0.001) AS WBEWGEW FROM WBBEW"
                        + " WHERE WBEWAUFTYP='B' AND  WBEWMANDANT=:WBEWMANDANT AND WBEWAUFKRS=:WBEWAUFKRS AND WBEWAUFLFD=:WBEWAUFLFD AND WBEWAUFPOS=:WBEWAUFPOS AND WBEWLO=:WBEWLO "
                        + "  GROUP BY WBEWMANDANT) X LEFT JOIN WBDAT ON WBEWMANDANT=WBMANDANT AND WBEWRWLFD=WBRWLFD";
                    or1.Parameters.Add("WBEWMANDANT", OracleType.NVarChar).Value = dwData["WBEWMANDANT"].ToString();
                    or1.Parameters.Add("WBEWAUFKRS", OracleType.NVarChar).Value = dwData["WBEWAUFKRS"].ToString();
                    or1.Parameters.Add("WBEWAUFLFD", OracleType.NVarChar).Value = dwData["WBEWAUFLFD"].ToString();
                    or1.Parameters.Add("WBEWAUFPOS", OracleType.NVarChar).Value = dwData["WBEWAUFPOS"].ToString();
                    or1.Parameters.Add("WBEWLO", OracleType.NVarChar).Value = dwData["WBEWLO"].ToString();
                    break;
                case 99:
                    or1.CommandText = "SELECT WBEWAUFKRS,WBEWAUFLFD,WBEWAUFPOS,WBEWART,WBEWVAR,WBEWFARBE,WBEWBESCHICH,WBEWBS,SUM(WBEWMTR*0.001) AS WBEWMTR "
                     + " FROM WBBEW "
                     + "  WHERE WBEWAUFTYP='V' AND WBEWBS=36 AND WBEWMANDANT=:WBEWMANDANT AND WBEWAUFKRS=:WBEWAUFKRS AND WBEWAUFLFD=:WBEWAUFLFD "
                     + " GROUP BY  WBEWAUFKRS,WBEWAUFLFD,WBEWAUFPOS,WBEWART,WBEWVAR,WBEWFARBE,WBEWBESCHICH,WBEWBS ";
                    or1.Parameters.Add("WBEWMANDANT", OracleType.NVarChar).Value = dwData["WBEWMANDANT"].ToString();
                    or1.Parameters.Add("WBEWAUFKRS", OracleType.NVarChar).Value = dwData["WBEWAUFKRS"].ToString();
                    or1.Parameters.Add("WBEWAUFLFD", OracleType.NVarChar).Value = dwData["WBEWAUFLFD"].ToString();
                    break;
                default:
                    break;
            }
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
                Result.Tables[0].TableName = "WBBEW";
            Return = Result;
            return Return;
        }
        public DataSet QueryWBBEW(DataRow dwData)
        {
            DataSet Return;
            DataSet Result = new DataSet();
            OracleCommand or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT * FROM WBBEW WHERE WBEWMANDANT=:WBEWMANDANT AND WBEWBELEG=:WBEWBELEG AND WBEWLFDNR=:WBEWLFDNR ";
            or1.Parameters.Add("WBEWMANDANT", OracleType.NVarChar).Value = dwData["WBEWMANDANT"].ToString();
            or1.Parameters.Add("WBEWBELEG", OracleType.NVarChar).Value = dwData["WBEWBELEG"].ToString();
            or1.Parameters.Add("WBEWLFDNR", OracleType.NVarChar).Value = dwData["WBEWLFDNR"].ToString();
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
                Result.Tables[0].TableName = "WBBEW";
            Return = Result;
            return Return;
        }
        public void UpdateWBBEW(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            DataSet result = new DataSet();
            or1 = OracleDB.CreateCommand();

            #region====Command====
            or1.CommandText = "UPDATE WBBEW SET "
                + "WBEWMANDANT=:WBEWMANDANT,"
                + "WBEWJJJJ=:WBEWJJJJ,"
                + "WBEWBELEG=:WBEWBELEG,"
                + "WBEWLFDNR=:WBEWLFDNR,"
                + "WBEWKUNDNR=:WBEWKUNDNR,"
                + "WBEWWERK=:WBEWWERK,"
                + "WBEWABT=:WBEWABT,"
                + "WBEWWAKZ=:WBEWWAKZ,"
                + "WBEWART=:WBEWART,"
                + "WBEWVAR=:WBEWVAR,"
                + "WBEWDESS=:WBEWDESS,"
                + "WBEWCOLORIT=:WBEWCOLORIT,"
                + "WBEWFARBE=:WBEWFARBE,"
                + "WBEWBESCHICH=:WBEWBESCHICH,"
                + "WBEWZUSTAND=:WBEWZUSTAND,"
                + "WBEWZENSUR=:WBEWZENSUR,"
                + "WBEWZENSURKZ=:WBEWZENSURKZ,"
                + "WBEWTAX=:WBEWTAX,"
                + "WBEWAUFMSL=:WBEWAUFMSL,"
                + "WBEWPACKTYP=:WBEWPACKTYP,"
                + "WBEWLO=:WBEWLO,"
                + "WBEWLB=:WBEWLB,"
                + "WBEWLP=:WBEWLP,"
                + "WBEWAUFBKZ=:WBEWAUFBKZ,"
                + "WBEWRWKRS=:WBEWRWKRS,"
                + "WBEWRWLFD=:WBEWRWLFD,"
                + "WBEWPOS=:WBEWPOS,"
                + "WBEWSTKNR=:WBEWSTKNR,"
                + "WBEWTSTKNR=:WBEWTSTKNR,"
                + "WBEWGEBNR=:WBEWGEBNR,"
                + "WBEWGEBPOS=:WBEWGEBPOS,"
                + "WBEWDPART=:WBEWDPART,"
                + "WBEWLAGE=:WBEWLAGE,"
                + "WBEWBAHN=:WBEWBAHN,"
                + "WBEWFSCHL=:WBEWFSCHL,"
                + "WBEWPACKNR=:WBEWPACKNR,"
                + "WBEWAUFTYP=:WBEWAUFTYP,"
                + "WBEWAUFKRS=:WBEWAUFKRS,"
                + "WBEWAUFLFD=:WBEWAUFLFD,"
                + "WBEWAUFPOS=:WBEWAUFPOS,"
                + "WBEWAFOLGE=:WBEWAFOLGE,"
                + "WBEWTP=:WBEWTP,"
                + "WBEWAPOS=:WBEWAPOS,"
                + "WBEWWDUPOS=:WBEWWDUPOS,"
                + "WBEWMNRKRS=:WBEWMNRKRS,"
                + "WBEWMLFDNR=:WBEWMLFDNR,"
                + "WBEWMPOS=:WBEWMPOS,"
                + "WBEWSCHICHT=:WBEWSCHICHT,"
                + "WBEWKSTKRS=:WBEWKSTKRS,"
                + "WBEWKST=:WBEWKST,"
                + "WBEWKOSTART=:WBEWKOSTART,"
                + "WBEWBS=:WBEWBS,"
                + "WBEWWERT=:WBEWWERT,"
                + "WBEWWERTDAT=:WBEWWERTDAT,"
                + "WBEWWEKORR=:WBEWWEKORR,"
                + "WBEWMTR=:WBEWMTR,"
                + "WBEWGEW=:WBEWGEW,"
                + "WBEWBRT=:WBEWBRT,"
                + "WBEWBUCHDAT=:WBEWBUCHDAT,"
                + "WBEWBUCHUHR=:WBEWBUCHUHR,"
                + "WBEWBUCHBEN=:WBEWBUCHBEN,"
                + "WBEWFC=:WBEWFC,"
                + "WBEWKONDAT=:WBEWKONDAT,"
                + "WBEWMATABR=:WBEWMATABR,"
                + "WBEWSTORKZ=:WBEWSTORKZ,"
                + "WBEWINVBLG=:WBEWINVBLG,"
                + "WBEWRENRG=:WBEWRENRG,"
                + "WBEWSTGRD=:WBEWSTGRD,"
                + "WBEWACTION=:WBEWACTION,"
                + "WBEWSAPKZ=:WBEWSAPKZ,"
                + "WBEWFILLER=:WBEWFILLER"
               + " WHERE  "
               + " WBEWMANDANT=:WBEWMANDANT AND WBEWBELEG=:WBEWBELEG AND WBEWLFDNR=:WBEWLFDNR";
            #endregion

            #region====Parameters====
            or1.Parameters.Add("WBEWMANDANT", OracleType.NVarChar).Value = dwData["WBEWMANDANT"].ToString();
            or1.Parameters.Add("WBEWJJJJ", OracleType.NVarChar).Value = dwData["WBEWJJJJ"].ToString();
            or1.Parameters.Add("WBEWBELEG", OracleType.NVarChar).Value = dwData["WBEWBELEG"].ToString();
            or1.Parameters.Add("WBEWLFDNR", OracleType.NVarChar).Value = dwData["WBEWLFDNR"].ToString();
            or1.Parameters.Add("WBEWKUNDNR", OracleType.NVarChar).Value = dwData["WBEWKUNDNR"].ToString();
            or1.Parameters.Add("WBEWWERK", OracleType.NVarChar).Value = dwData["WBEWWERK"].ToString();
            or1.Parameters.Add("WBEWABT", OracleType.NVarChar).Value = dwData["WBEWABT"].ToString();
            or1.Parameters.Add("WBEWWAKZ", OracleType.NVarChar).Value = dwData["WBEWWAKZ"].ToString();
            or1.Parameters.Add("WBEWART", OracleType.NVarChar).Value = dwData["WBEWART"].ToString();
            or1.Parameters.Add("WBEWVAR", OracleType.NVarChar).Value = dwData["WBEWVAR"].ToString();
            or1.Parameters.Add("WBEWDESS", OracleType.NVarChar).Value = dwData["WBEWDESS"].ToString();
            or1.Parameters.Add("WBEWCOLORIT", OracleType.NVarChar).Value = dwData["WBEWCOLORIT"].ToString();
            or1.Parameters.Add("WBEWFARBE", OracleType.NVarChar).Value = dwData["WBEWFARBE"].ToString();
            or1.Parameters.Add("WBEWBESCHICH", OracleType.NVarChar).Value = dwData["WBEWBESCHICH"].ToString();
            or1.Parameters.Add("WBEWZUSTAND", OracleType.NVarChar).Value = dwData["WBEWZUSTAND"].ToString();
            or1.Parameters.Add("WBEWZENSUR", OracleType.NVarChar).Value = dwData["WBEWZENSUR"].ToString();
            or1.Parameters.Add("WBEWZENSURKZ", OracleType.NVarChar).Value = dwData["WBEWZENSURKZ"].ToString();
            or1.Parameters.Add("WBEWTAX", OracleType.NVarChar).Value = dwData["WBEWTAX"].ToString();
            or1.Parameters.Add("WBEWAUFMSL", OracleType.NVarChar).Value = dwData["WBEWAUFMSL"].ToString();
            or1.Parameters.Add("WBEWPACKTYP", OracleType.NVarChar).Value = dwData["WBEWPACKTYP"].ToString();
            or1.Parameters.Add("WBEWLO", OracleType.NVarChar).Value = dwData["WBEWLO"].ToString();
            or1.Parameters.Add("WBEWLB", OracleType.NVarChar).Value = dwData["WBEWLB"].ToString();
            or1.Parameters.Add("WBEWLP", OracleType.NVarChar).Value = dwData["WBEWLP"].ToString();
            or1.Parameters.Add("WBEWAUFBKZ", OracleType.NVarChar).Value = dwData["WBEWAUFBKZ"].ToString();
            or1.Parameters.Add("WBEWRWKRS", OracleType.NVarChar).Value = dwData["WBEWRWKRS"].ToString();
            or1.Parameters.Add("WBEWRWLFD", OracleType.NVarChar).Value = dwData["WBEWRWLFD"].ToString();
            or1.Parameters.Add("WBEWPOS", OracleType.NVarChar).Value = dwData["WBEWPOS"].ToString();
            or1.Parameters.Add("WBEWSTKNR", OracleType.NVarChar).Value = dwData["WBEWSTKNR"].ToString();
            or1.Parameters.Add("WBEWTSTKNR", OracleType.NVarChar).Value = dwData["WBEWTSTKNR"].ToString();
            or1.Parameters.Add("WBEWGEBNR", OracleType.NVarChar).Value = dwData["WBEWGEBNR"].ToString();
            or1.Parameters.Add("WBEWGEBPOS", OracleType.NVarChar).Value = dwData["WBEWGEBPOS"].ToString();
            or1.Parameters.Add("WBEWDPART", OracleType.NVarChar).Value = dwData["WBEWDPART"].ToString();
            or1.Parameters.Add("WBEWLAGE", OracleType.NVarChar).Value = dwData["WBEWLAGE"].ToString();
            or1.Parameters.Add("WBEWBAHN", OracleType.NVarChar).Value = dwData["WBEWBAHN"].ToString();
            or1.Parameters.Add("WBEWFSCHL", OracleType.NVarChar).Value = dwData["WBEWFSCHL"].ToString();
            or1.Parameters.Add("WBEWPACKNR", OracleType.NVarChar).Value = dwData["WBEWPACKNR"].ToString();
            or1.Parameters.Add("WBEWAUFTYP", OracleType.NVarChar).Value = dwData["WBEWAUFTYP"].ToString();
            or1.Parameters.Add("WBEWAUFKRS", OracleType.NVarChar).Value = dwData["WBEWAUFKRS"].ToString();
            or1.Parameters.Add("WBEWAUFLFD", OracleType.NVarChar).Value = dwData["WBEWAUFLFD"].ToString();
            or1.Parameters.Add("WBEWAUFPOS", OracleType.NVarChar).Value = dwData["WBEWAUFPOS"].ToString();
            or1.Parameters.Add("WBEWAFOLGE", OracleType.NVarChar).Value = dwData["WBEWAFOLGE"].ToString();
            or1.Parameters.Add("WBEWTP", OracleType.NVarChar).Value = dwData["WBEWTP"].ToString();
            or1.Parameters.Add("WBEWAPOS", OracleType.NVarChar).Value = dwData["WBEWAPOS"].ToString();
            or1.Parameters.Add("WBEWWDUPOS", OracleType.NVarChar).Value = dwData["WBEWWDUPOS"].ToString();
            or1.Parameters.Add("WBEWMNRKRS", OracleType.NVarChar).Value = dwData["WBEWMNRKRS"].ToString();
            or1.Parameters.Add("WBEWMLFDNR", OracleType.NVarChar).Value = dwData["WBEWMLFDNR"].ToString();
            or1.Parameters.Add("WBEWMPOS", OracleType.NVarChar).Value = dwData["WBEWMPOS"].ToString();
            or1.Parameters.Add("WBEWSCHICHT", OracleType.NVarChar).Value = dwData["WBEWSCHICHT"].ToString();
            or1.Parameters.Add("WBEWKSTKRS", OracleType.NVarChar).Value = dwData["WBEWKSTKRS"].ToString();
            or1.Parameters.Add("WBEWKST", OracleType.NVarChar).Value = dwData["WBEWKST"].ToString();
            or1.Parameters.Add("WBEWKOSTART", OracleType.NVarChar).Value = dwData["WBEWKOSTART"].ToString();
            or1.Parameters.Add("WBEWBS", OracleType.NVarChar).Value = dwData["WBEWBS"].ToString();
            or1.Parameters.Add("WBEWWERT", OracleType.NVarChar).Value = dwData["WBEWWERT"].ToString();
            or1.Parameters.Add("WBEWWERTDAT", OracleType.NVarChar).Value = dwData["WBEWWERTDAT"].ToString();
            or1.Parameters.Add("WBEWWEKORR", OracleType.NVarChar).Value = dwData["WBEWWEKORR"].ToString();
            or1.Parameters.Add("WBEWMTR", OracleType.NVarChar).Value = dwData["WBEWMTR"].ToString();
            or1.Parameters.Add("WBEWGEW", OracleType.NVarChar).Value = dwData["WBEWGEW"].ToString();
            or1.Parameters.Add("WBEWBRT", OracleType.NVarChar).Value = dwData["WBEWBRT"].ToString();
            or1.Parameters.Add("WBEWBUCHDAT", OracleType.NVarChar).Value = dwData["WBEWBUCHDAT"].ToString();
            or1.Parameters.Add("WBEWBUCHUHR", OracleType.NVarChar).Value = dwData["WBEWBUCHUHR"].ToString();
            or1.Parameters.Add("WBEWBUCHBEN", OracleType.NVarChar).Value = dwData["WBEWBUCHBEN"].ToString();
            or1.Parameters.Add("WBEWFC", OracleType.NVarChar).Value = dwData["WBEWFC"].ToString();
            or1.Parameters.Add("WBEWKONDAT", OracleType.NVarChar).Value = dwData["WBEWKONDAT"].ToString();
            or1.Parameters.Add("WBEWMATABR", OracleType.NVarChar).Value = dwData["WBEWMATABR"].ToString();
            or1.Parameters.Add("WBEWSTORKZ", OracleType.NVarChar).Value = dwData["WBEWSTORKZ"].ToString();
            or1.Parameters.Add("WBEWINVBLG", OracleType.NVarChar).Value = dwData["WBEWINVBLG"].ToString();
            or1.Parameters.Add("WBEWRENRG", OracleType.NVarChar).Value = dwData["WBEWRENRG"].ToString();
            or1.Parameters.Add("WBEWSTGRD", OracleType.NVarChar).Value = dwData["WBEWSTGRD"].ToString();
            or1.Parameters.Add("WBEWACTION", OracleType.NVarChar).Value = dwData["WBEWACTION"].ToString();
            or1.Parameters.Add("WBEWSAPKZ", OracleType.NVarChar).Value = dwData["WBEWSAPKZ"].ToString();
            or1.Parameters.Add("WBEWFILLER", OracleType.NVarChar).Value = dwData["WBEWFILLER"].ToString();
            #endregion

            Connect2Proxy(or1);
        }
    }
}
